// 器材

import request from "@/api/request";
// 分页查询器材
export const query_equip = (params) => {
  return request({
    url: "/essentialdata/pe/selectAll",
    method: "post",
    data: params,
  });
};

// 新增器材
export const add_equip = (params) => {
  return request({
    url: "/essentialdata/pe/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};
// 分页查询器材分类树
export const select_equip = (params) => {
  return request({
    url: "/essentialdata/pe/selectEcTree/"+params,
    method: "post"
  });
};

// 逻辑删除器材
export const delete_equip = (params) => {
  return request({
    url: `/essentialdata/pe/delete/${params}`,
    method: "post",
    data: params,
  });
};

// 修改器材
export const update_equip = (params) => {
  return request({
    url: "/essentialdata/pe/update",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 查询器材详情
export const select_equipDetails = (params) => {
  return request({
    url: `/essentialdata/pe/selectDetails/${params}`,
    method: "post",
    data: params,
  });
};

// 选择器材型号
// export const select_equipModel = (params) => {
//   return request({
//     url: "/essentialdata/pe/setModel",
//     method: "post",
//     data: params,
//     headers: { "Content-Type": "application/json" },
//   });
// };


// 生产商
export const select_Manufacturer = (params) => {
  return request({
    url: "/essentialdata/ed/producerList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 型号
export const select_Model = (params) => {
  return request({
    url: "/essentialdata/ed/modelList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};

// 计量单位
export const select_UnitList = (params) => {
  return request({
    url: "/essentialdata/ed/unitList",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json" },
  });
};